import React from 'react'
import "../css/login.css"



class Login extends React.Component {
    constructor(props) {
        super(props)
    }
    render() {
        return (
            <div className="login_container">
                <div className="login_header_container">
                    <div className="login_top_fontSzie"><h3>小米商城</h3></div>
                </div>
                <div className="login_center_container">
                    <div className="login_input_container">
                        <input placeholder="邮箱/手机号/小米ID" ref="username"></input>
                        <input placeholder="请输入密码" ref="password"></input>
                        <div className="login_botton_container">
                            <button onClick={() => {
                                var user = this.refs.username.value;
                                var pass = this.refs.password.value
                                var maessage = {
                                    user: user,
                                    pass: pass
                                }
                                this.props.history.push({
                                    pathname: '/home',
                                    state: maessage
                                })
                            }}>登录</button>
                        </div>
                    </div>

                </div>
            </div>
        )
    }
}
export default Login